package edu.api.jdbc_api;

import java.util.List;

/**
 * 实体类和表bs_user形成映射关系
 * 属性和表字段兼容  属性名和表字段名保持一致，类型兼容
 */
public class Bs_user {

    private Integer id;
    private String username;
    private String password;
    private String email;
    private String phone;
    private String company;

    //用户和收货地址的关系
    private List<Bs_address> bs_addressList;

    public List<Bs_address> getBs_addressList() {
        return bs_addressList;
    }

    public void setBs_addressList(List<Bs_address> bs_addressList) {
        this.bs_addressList = bs_addressList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public Bs_user() {
    }

    public Bs_user(Integer id, String username, String password, String email, String phone, String company) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.phone = phone;
        this.company = company;
    }

    public Bs_user(Integer id, String username, String password, String email, String phone, String company, List<Bs_address> bs_addressList) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.phone = phone;
        this.company = company;
        this.bs_addressList = bs_addressList;
    }

    @Override
    public String toString() {
        return "Bs_user{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", company='" + company + '\'' +
                '}';
    }
}
